home *** CD-ROM | disk | FTP | other *** search
- #ifndef EGS_EGSINTUI_H
- #define EGS_EGSINTUI_H
-
- /***************************************************************************\
- *
- * $
- * $ FILE : egsintui.h
- * $ VERSION : 1
- * $ REVISION : 8
- * $ DATE : 08-Dec-93 12:45
- * $
- * $ Author : mvk
- * $
- *
- *****************************************************************************
- * *
- * (c) Copyright 1990/94 VIONA Development *
- * All Rights Reserved *
- * *
- \***************************************************************************/
-
-
- #ifndef EXEC_TYPES_H
- #include <exec/types.h>
- #endif
- #ifndef EXEC_PORTS_H
- #include <exec/ports.h>
- #endif
- #ifndef DEVICES_INPUTEVENT_H
- #include <devices/inputevent.h>
- #endif
- #ifndef GRAPHICS_TEXT_H
- #include <graphics/text.h>
- #endif
- #ifndef EGS_EGS_H
- #include <egs/egs.h>
- #endif
- #ifndef EGS_EGSBLIT_H
- #include <egs/egsblit.h>
- #endif
- #ifndef EGS_EGSLAYERS_H
- #include <egs/egslayers.h>
- #endif
- #ifndef EGS_EGSGFX_H
- #include <egs/egsgfx.h>
- #endif
- #ifndef EGS_EGSINTUIGFX_H
- #include <egs/egsintuigfx.h>
- #endif
-
-
- /*
- * This library implements a complete window system with menus, gadgets etc.
- * It uses only the other EGS libraries and is thus implementable for other
- * graphic boards e. g. the GVP EGS-110/24. The library works as indepen-
- * dent from the current graphic mode as possible.
- *
- * The basic structure of the system resembles Commodore's Intuition library.
- * Most names and structures derive from it but are sometimes modified a
- * great deal.
- *
- * The library uses an extended EGS screen type to give you the choice of
- * whether to use the window system or not.
- *
- * All graphics drawing (windows, gadget and menus) is carried out by IntuiGfx
- * stack programs (refer to "egsintuigfx.h") which is the most significant
- * difference to the Commodore library. he reasons for this technique is the
- * clumsy implementation of Intuition graphics in Commodore's library (three
- * lists, no multiple usage of the structures, waste of memory by overloaded
- * structures and lacking flexibility). The IntuiGfx solution is so flexible
- * that even the knobs of PropGadets are realised by such a program; even the
- * graphics for window borders is driven by IntuiGfx programs.
- *
- * Unless you use the EGSGadBox library, it is recommended to use
- * "GimmeZeroZero" windows as the overhead is not that gigantic in contrast
- * to Commodore's implementation. However, using a ClipRect (see EGSGfx's
- * EG_InstallClipRect, the same effect can be achieved.
- *
- * Requesters are not implemented in the library since all requesters are in
- * fact windows, and the overhead for an extra structure does not pay.
- *
- * Menus have two new features: they can "hang" at the window border and they
- * can be teared off and then stay open. The advantage is that the menu way
- * is minimized and often-used menus are accessible directly.
- *
- */
-
- typedef struct EI_Window *EI_WindowPtr;
- typedef struct EI_EIntuiMsg *EI_EIntuiMsgPtr;
-
-
- /*
- * Menus
- *
- * Menus serve to invoke an action or modify a state. Menus pop up by
- * pressing the right mouse button and appear at the screen or the window
- * title. A menu item is selected by moving the pointer over it while
- * pressing the right mouse button and releasing the button over it (alter-
- * natively "toggleSelect" menu items can be flipped by shortly pressing the
- * left mouse button).
- *
- * A menu item can have submenus which open when the item is reached with the
- * mouse pointer and which can then be selected. This nesting is infinite
- * but should not be exaggerated.
- *
- * You can tear off menus, i.e. they stay open even after you released the
- * right mouse button. This is performed by a special menu item. These open
- * menus can be selected with the right mouse button and moved with the left
- * one.
- *
- *---------------------------------------------------------------------------
- *
- * Structures:
- *
- * Menu, MenuPtr
- *
- * .ItemMaster : Pointer to menu item the menu of which is this menu's super
- * menu. NULL if this menu is the main menu.
- * .MenuMaster : Pointer to menu that is this menu's super menu. NULL if
- * this menu is the main menu.
- * .FirstItem : Pointer to the first menu item of this menu.
- * .LeftEdge,
- * .TopEdge : Coordinates of the menu relative to the super menu or
- * title bar.
- * .Width,
- * .Height : Menu's size that determines the background that is saved
- * when the menu is displayed. This means the size should at
- * least contain the menu with all its menu items but also
- * should not exceed that area to save memory.
- *
- * .Border : Render program for the basic menu structure without items.
- * This stack program is passed over the width (in FP+1) and
- * height (in FP+0) of the menu so that it can be used for
- * all menus. This routine should also clear the background
- * of the menu.
- *
- * MenuItem, MenuItemPtr
- *
- * .Prev,
- * .Next : Menu item chaining; the first and last menu item
- * contain NULL in the corresponding field.
- * .LeftEdge,
- * .TopEgde : Coordinates of the item's top left corner, relative to
- * its menu.
- * .Width,
- * .Height : Item's size.
- *
- * .Active : Render program if the item is active.
- *
- * .Passive : Render program if the item is passive. If this routine
- * is NULL the library uses a ghosting feature to show
- * unselectable items. The your rendering prg is called by
- * EI_GadgetOff if you put a IntuiGfx-Prg in the
- * Passive place.
- *
- * .CheckMark : Render program if the item is selected for
- * "ToggleSelect".
- *
- * .Select : Render program executed when the item is active and
- * the mouse touches it. The program is passed over the
- * width (in FP+1) and height (in FP+0) of the item so
- * that all items can share the same program.
- *
- * .Release : Render program called when the mouse leaves the item.
- * The program is passed over the item size, too. It is
- * called even when the menu is drawn so that the normal
- * render programs need not draw the graphics for "not
- * selected".
- *
- * If you use Release and Select the gadget flags
- * STD_COMPLEMENT and STD_HIGHLIGHT should be not set.
- *
- * .Flags : Flags of the item:
- *
- * - MENU_ACTIVE : Item is active and selectable.
- * - MENU_SELECTED : Item is selected; for items that can be switched on
- * and off.
- * - MENU_SELECTABLE: Item is selectable.
- * - MENU_TOGGLE : Items toggles its state each time when selected.
- * - MENU_LEAVE : Item causes no message but the menu containing this
- * item is teared off.
- *
- * .ID : Number of the item; is passed over as "code" of the
- * EIDCMP message. The advantage is that for inserting
- * new items the message for old items does not change.
- * .SubMenu : Submenu, NULL if missing.
- * .MutualExclude : Set of items that are to be deselected if this item is
- * selected. For those items no extra message is sent.
- * .MutualInclude : Set of items that are to be selected if this item is
- * selected. For those items no extra message is sent.
- * .HotKey : ASCII-Code selecting this item when pressed together
- * with the right Amiga key
- *
- *
- * The menu structure is practically only the drawing area on which items are
- * located. A title bar as for Commodore's Intuition should be designed such
- * that the main menu is as wide as the title bar, and each menu title is an
- * item of this main menu. The real menus are then logical submenus of that
- * title bar main menu. Then a Commodore Intuition menu with submenus (e.g.
- * Project.Load.IFFPicture) has really two submenus in the EGSIntui library.
- * For pop up menus it might be better to start with a real vertical
- * oriented menu.
- *
- */
-
- /* Corresponding MenuItemFlagSet has 16 bits ! */
-
- #define EI_MENU_ACTIVE 1
- #define EI_MENU_SELECTED 2
- #define EI_MENU_SELECTABLE 4
- #define EI_MENU_TOGGLE 8
- #define EI_MENU_MOUSED 16
- #define EI_MENU_MOVE 32
- #define EI_MENU_LEAVE 64
-
- typedef struct EI_Menu *EI_MenuPtr;
- typedef struct EI_MenuItem *EI_MenuItemPtr;
-
- struct EI_Menu {
-
- EI_MenuPtr WinPrev, WinNext;
- EI_MenuItemPtr ItemMaster;
- EI_MenuPtr MenuMaster;
- EI_MenuItemPtr FirstItem;
- WORD LeftEdge,TopEdge,
- Width, Height;
-
- IG_IntuiGfxPtr Border;
- E_EBitMapPtr BackSave;
- EL_LayerPtr Layer;
- EG_RastPortPtr Rast;
- };
-
- struct EI_MenuItem {
-
- EI_MenuItemPtr Prev, Next;
- WORD LeftEdge, TopEdge, Width, Height;
- IG_IntuiGfxPtr Active, Passive,
- CheckMark, Select, Release;
- UWORD Flags;
- UWORD Pad0;
- LONG ID;
- EI_MenuPtr SubMenu;
- ULONG MutualExclude, MutualInclude;
- BYTE Pad1;
- char HotKey;
- UWORD Pad2;
- };
-
-
-
- /*
- * Gadgets are window elements that the user can click on and thereby give
- * the application information. There are six kinds of gadgets:
- *
- * - ActionGadget : When pressing the gadget the program gets a message.
- * This gadget can only be selected.
- *
- * - BoolGadget : By pressing this gadget a flag is toggled from TRUE to
- * FALSE and vice versa. With such gadgets flags can be
- * requested. You can choose whether or not you want a
- * message when the gadget is selected.
- *
- * - StringGadget : In these gadgets you can have a string edited, e.g.
- * file names. The library offers some editing capabili-
- * ties which need not be implemented. If required, you
- * can get a message when the gadget is entered and/or
- * left.
- *
- * - PropGadget : With these gadget a numerical value can be changed.
- * For that a knob in a rectangle is created which can be
- * moved with the mouse. Its position indicates the
- * value, and its size represents the ratio of its value
- * and the maximum number possible. You can get messages
- * when the gadget is selected, moved and/or left.
- * Move message should be used only if your program can
- * cope with the amount of messages arriving.
- *
- * - IntegerGadget : This is an extended string gadget allowing only
- * editing of an integer number.
- *
- * - RealGadget : Like an integer gadget but for IEEE double precision
- * numbers.
- *
- * - UserDefGadget : A gadget that calls user functions on activation,
- * release and on any requested IDCMP event that
- * occurs in between.
- *
- * - MasterGadget : A gadget that serves as handle for several other gadgets
- * that are linked to it. Gadget operations that are
- * executed for the master gadget are also recursivly
- * called for all its son gadgets. By using the callback
- * feature in the gadget structure, one can even build
- * complex gadgets, consisting of several normal gadgets,
- * but appearing as being one normal gadget.
- * See also "egsgadbox..." for examples and more
- * information.
- *
- *---------------------------------------------------------------------------
- *
- * Structures:
- *
- * All gadgets own the same basic structure and have then additional elements
- * depending on their type.
- *
- * Gadget, GadgetPtr
- *
- * .Prev,
- * .Next : Chaining of the gadgets, the first and last element of
- * a list always point to NULL.
- * .LeftEdge,
- * .TopEgde : Coordinates of the top left corner.
- * .Width,
- * .Height : Gadget size.
- * .Id : Identification number.
- * .Active : Render program drawing the gadget if it is active.
- * .Passive : Render program drawing the gadget if it is passive.
- * If this routine is NULL the library uses a ghosting
- * mechanism for displaying deactivated gadgets.
- * .Select : Render program executed when the gadget is selected.
- * The program is passed over the width (in FP+1) and
- * height (in FP+0) of the item so that several gadgets
- * can share the same program. If it is a PropGadget then
- * the size of the KNOB (in FP+0) or the height of the
- * knob for vertical PropGadget (in FP+0) is passed over !
- * .Release : Render program called when the gadget is released.
- * The program is passed over the item size, too. It is
- * called even when the gadget is drawn so that at the
- * beginning it is deselected. For PropGadgets this programm
- * is called for the KNOB when the gadget is passive.
- *
- * .Flags : Gadget flags.
- *
- * - GADGET_BORDER : Gadget is in the window border.
- * - REL_RIGHT : Gadget coordinates are relative to the right window
- * border.
- * - REL_BOTTOM : Gadget coordinates are relative to the bottom
- * window border.
- * - SYS_GADGET : It is a system gadget.
- * - GADGET_SELECTED : Gadget is currently selected.
- * - REL_VERIFY : Gadget sends message only if the pointer was over
- * it when the mouse button was released.
- * - GADGET_IMMEDIATE: Gadget sends message as soon as clicked onto.
- * - TOGGLE_SELECT : For bool gadgets, the gadget toggles its state each
- * time selected.
- * - REPEAT_GADGET : As long as pressed, the gadget sends messages in
- * short intervals.
- * - GADGET_INACTIVE : Gadget cannot be selected.
- *
- * - STD_COMPLEMENT : Gadget gets a standard highlight method by inverting
- * the gadget area.
- *
- * - STD_HIGHLIGHT : Gadget gets a standard highlight methode, a 3D
- * border.
- *
- * The STD_COMPLEMENT and STD_HIGHLIGHT
- * flags should not be set if you use a
- * IntuiGfx Prg for render the Gadget if the user
- * Relese or Select the Gadgets.
- *
- * .Type : Gadget's type.
- * .HotKey : Character that the user can use to activate/toggle..
- * the gadget. A null byte stands for no activating key.
- * .Call : Function called before the gadget sends its message.
- * The function gets a message pointer in A1 and may change
- * the message to its gusto. If the message's EIDCMP flags
- * are cleared, the message is not sent.
- * .UserData : Free for user data.
- *
- *
- * BoolGadget:
- *
- * .Flag : Flag set or cleared corresponding to the gadget state.
- * .Exclude,
- * .Include : Arrays of pointer to boolgadgets, that shall change their
- * state if this gadget is activated.
- * The system decates if there is a pointer to the Gadget ifself
- * in the GadgetArray, so that you need only one GadgetArray for
- * all gadgets which should be excluded.
- *
- * StringGadget:
- *
- * .Buffer : Pointer to a buffer containing the text. The text
- * terminates with a null byte and can be read from this
- * buffer after processing.
- * .UndoBuffer : Pointer to undo buffer. The undo buffer must be at
- * least as big as the original buffer. Selecting the
- * gadget copies the buffer's contents into the undo
- * buffer. By pressing Amiga-O the undo buffer is copied
- * into the original buffer.
- * .BufferPos : Cursor posititon in the text buffer.
- * .MaxChars : Maximum characters in the buffer.
- * .numChars : Contains during and after processing the number of
- * characters in the buffer.
- * .UndoPos : Cursor position in the undo buffer.
- *
- * .Justify : Specifies if the text is to appear on the left, right
- * or in the center of the gadget box.
- * .Font : EFont to use for editing, must be non proportional
- *
- *
- * The programs "select" and "release" have no function for string gadgets
- * as then the activity is indicated by the visible cursor.
- *
- *
- * PropGadget:
- *
- * .Propflags : Gadget flags:
- *
- * - PROP_HORIZ : Gadget moves horizontally if this bit is set, else
- * vertically.
- * - PROP_FOLLOW : The program gest a new message each time the knob
- * moves. You should use this flag with care as
- * messages are sent frequently.
- * - PROP_BORDER : The gadget is resized automatically if the window
- * is resized.
- * - PROP_MOVES : The gadget's knob is currently being moved.
- *
- *
- * .Maximum : Maximum gadget value.
- * .Size : Knob size in gadget units.
- * .Value : Value of the gadget.
- *
- * The programs "active"/"passive" should draw the gadget border.
- * The programs "select"/"release" are called to draw the knob and are passed
- * over the knob width (the knob height for vertical PropGadgets).
- * Example: .maximum contains 1000. Then .value and .size must be in the
- * range from 0 to 1000. If one fifth of the data is visible, then .size
- * is 1000/5 = 200 and the maximum value for .value is 800.
- *
- *
- * IntegerGadget, RealGadget:
- *
- * .Value : Value after editing is finished.
- * .Valid : Flag set after editing is finished.
- *
- *
- * UserGadget:
- *
- * SelectCall : Function to be called, when the gadget is selected,
- * or NULL for no call, same parameters as .call.
- * ReleaseCall : Function to be called, if the gadget is released,
- * or NULL for no call, same parameters as .call.
- * ActionCall : Function to be called, when the gadget is active and
- * and event specified in .callFlags occurs.
- *
- * MasterGadget:
- *
- * MasterType : Custom type identifier for this gadget.
- * FirstSon : Pointer to first secondary gadget
- * NumSons : Number of secondary gadgets
- *
- *
- */
-
- /* Corresponding GadgetFlagSet has 16 bits ! */
-
- #define EI_GADGET_BORDER (1<<0)
- #define EI_REL_RIGHT (1<<1)
- #define EI_REL_BOTTOM (1<<2)
- #define EI_SYS_GADGET (1<<3)
- #define EI_GADGET_SELECTED (1<<4)
- #define EI_REL_VERIFY (1<<5)
- #define EI_GADGET_IMMEDIATE (1<<6)
- #define EI_TOGGLE_SELECT (1<<7)
- #define EI_REPEAT_GADGET (1<<8)
- #define EI_GADGET_INACTIVE (1<<9)
- #define EI_STD_HIGHLIGHT (1<<10)
- #define EI_STD_COMPLEMENT (1<<11)
- #define EI_OLD_SELECT (1<<12)
- #define EI_CALL_ON_ELSEKEY (1<<13)
- #define EI_CALL_ON_ANYKEY (1<<14)
-
- /* Gadget types */
-
- #define EI_ACTION_GADGET 0
- #define EI_BOOL_GADGET 1
- #define EI_STRING_GADGET 2
- #define EI_PROP_GADGET 3
- #define EI_INTEGER_GADGET 4
- #define EI_USERDEF_GADGET 5
- #define EI_MASTER_GADGET 6
- #define EI_REAL_GADGET 7
- #define EI_DROP_GADGET 8
-
-
- typedef struct EI_Gadget *EI_GadgetPtr;
-
- typedef APTR EI_GadgetCall;
-
- typedef struct EI_GadgetClass *EI_GadgetClassPtr;
-
- struct EI_Gadget {
-
- EI_GadgetPtr PrevGadget, NextGadget;
-
- WORD CheckLeft, CheckTop,
- LeftEdge, TopEdge,
- Width, Height;
-
- LONG GadgetID;
- IG_IntuiGfxPtr Active, Passive,
- Select, Release;
-
- UWORD Flags;
- UBYTE GadgetType;
- char HotKey;
- /*
- * You get the message in A1, and have to adhere to standard calling
- * convention (A0/A1, D0/D1 are scratch).
- *
- */
- EI_GadgetCall Call;
- APTR UserData;
- };
-
- typedef struct EI_Gadget EI_GadgetClass;
- typedef struct EI_BoolGadget *EI_BoolGadPtr;
- typedef EI_BoolGadPtr EI_GadgetArray;
- typedef EI_GadgetArray *EI_GadgetArrayPtr;
-
- struct EI_BoolGadget {
-
- struct EI_Gadget Class;
- UBYTE Flag;
- UBYTE Pad_1, Pad_2, Pad_3;
- EI_GadgetArrayPtr Exclude, Include;
- };
-
-
- /* Corresponding EI_PropFlagSet has 16 bits ! */
-
- #define EI_PROP_HORIZ 1
- #define EI_PROP_FOLLOW 2
- #define EI_PROP_MOVES 4
- #define EI_PROP_BORDER 8
- #define EI_PROP_DELTA_REFRESH 16
-
- /* Optimized refresh (described below) */
-
- typedef struct EI_PropGadget *EI_PropGadPtr;
-
- struct EI_PropGadget {
-
- struct EI_Gadget Class;
- UWORD Propflags;
- WORD Maximum, Size, Value;
- WORD V_height, V_pos;
- };
-
- /*********************************************************
- *
- * These are examples of prop-gadget IntuiGfx programs for
- * rendering.
- *
- * The PropBorder program must then be put in the field called
- * Active. This program renders the full border of the gadget
- * and clears the interior.
- *
- * IG_IntuiGfx PropBorder[] = {
- * IG_Const-1,IG_Const-1,IG_Move,
- * IG_CNormal,IG_CLight,IG_CDark,
- * IG_GETFI+1,IG_ADDI+2,
- * IG_GETFI+0,IG_ADDI+2,
- * IG_Rect3d,IG_RTF+2 };
- *
- * These are the knob programs for verical and horizontal prop-gadgets,
- * respectively. They are put into the Select field in the EI_Gadget
- * structure.
- *
- * IG_IntuiGfx VPropKnobb[] = {
- * IG_CNormal, IG_CDark, IG_CLight,
- * IG_GETFI+1, IG_GETFI+0,
- * IG_Rect3d,
- * IG_RTF+2 };
- *
- * IG_IntuiGfx HPropKnobb[] = {
- * IG_CNormal, IG_CDark, IG_CLight,
- * IG_GETFI+0, IG_GETFI+1,
- * IG_Rect3d, IG_RTF+2 };
- *
- * If you want an optimized refresh for the knob, you have to set
- * the flag EI_PROP_DELTA_REFRESH and put a program into the Release
- * field. The program PropDeltaB[] below is an example of this.
- *
- * IG_IntuiGfx PropDeltaB[] = {
- * IG_CNormal, IG_Color,
- * IG_GETFI+1, IG_GETFI+0,
- * IG_Box, IG_RTF+2 };
- *
- *
- **********************************************************/
-
- /* Enumeration type EI_StringJustify has 8 bits ! */
-
- #define EI_JUSTIFY_LEFT 0
- #define EI_JUSTIFY_RIGHT 1
- #define EI_JUSTIFY_CENTER 2
-
- typedef struct EI_StringGadget *EI_StringGadPtr;
-
- struct EI_StringGadget {
-
- struct EI_Gadget Class;
- char *Buffer, *UndoBuffer;
- WORD BufferPos, MaxChars,
- DispPos, UndoPos,
- NumChars, DispCount,
- DispFront;
- WORD CLeft, CTop;
- UBYTE Justify;
- UBYTE Pad;
- EG_EFontPtr Font;
- };
-
- typedef struct EI_IntGadget *EI_IntGadPtr;
-
- struct EI_IntGadget {
- struct EI_StringGadget SG;
- LONG Value;
- UBYTE Valid;
- UBYTE Pad;
- };
-
- typedef struct EI_UserGadget *EI_UserGadPtr;
-
- struct EI_UserGadget {
-
- struct EI_Gadget Class;
- EI_GadgetCall SelectCall,
- ReleaseCall,
- ActionCall,
- InitCall;
- /* IDCMPFlags to respond to for ActionCall: */
- ULONG CallFlags;
- };
-
- /*
- * SelectCall,ReleaseCall:
- *
- * You get the message in A1, and have to adhere to standard calling
- * convention (A0/A1, D0/D1 are scratch).
- *
- * ActionCall:
- *
- * You get the message in A1, your gadget in A2
- *
- * InitCall:
- *
- * You get your window in A1, your gadget in A0
- *
- */
-
- typedef struct EI_MasterGadget *EI_MasterGadPtr;
-
- struct EI_MasterGadget {
-
- struct EI_Gadget Class;
- LONG MasterType;
- EI_GadgetPtr FirstSon;
- WORD NumSons;
- WORD Pad;
- };
-
- typedef struct EI_RealGadget *EI_RealGadPtr;
-
- struct EI_RealGadget {
- struct EI_StringGadget SG;
- double Value;
- UBYTE Valid;
- UBYTE Pad;
- };
-
- /*
- * Drop Gadget
- */
-
- /* Corresponding DropGadgetFlagSet has 32 bits ! */
-
- #define EI_ACCEPTS_FILES (1<<0)
- #define EI_ACCEPT_FILE (1<<1)
- #define EI_ACCEPTS_CLIP (1<<2)
- #define EI_ACCEPTS_DATA (1<<3)
- #define EI_FULL_WINDOWSIZE (1<<4)
-
-
- typedef struct EI_DropGadget *EI_DropGadPtr;
-
- struct EI_DropAcceptor {
- LONG Key;
- E_EMousePtr Mouse;
- };
-
- typedef struct EI_DropAcceptor *EI_AcceptList[];
- typedef EI_AcceptList *EI_AcceptListPtr;
-
- struct EI_DropGadget {
- ULONG DropFlags;
- EI_AcceptListPtr Accepts;
- };
-
- /*
- * Screens
- *
- * Screens are logical successors of the EGS "EScreens". They are extended
- * by fields for window and layer support.
- *
- * If no windows are needed it does not pay to use the screens from this
- * module as they have some overhead. Moreover, EGSIntui screens cannot
- * catch and redirect events.
- *
- *---------------------------------------------------------------------------
- *
- * Structures:
- *
- * NewScreen
- *
- * .Mode : Screen mode, refer to EGS library.
- * .Depth : Screen depth, refer to EGS library.
- * .Title : Screen title appearing in the title bar.
- * .Colors : Screen colors, refer to EGS library.
- * .WinColors : Recommended colors for windows.
- * .BackPen : Screen background pen.
- * .BackPattern : Background pattern or picture for the screen.
- * .Mouse : Standard mouse pointer for the screen.
- * .Font : Font for screens and windows titlebar, if NULL the
- * default fonts are used
- * .Flags : The new screens screenflags
- *
- * Screen,ScreenPtr
- *
- * .Front,
- * .Back : Chaining.
- * .EScreen : Pointer to the EScreen structure.
- * .FirstWindow
- * .LastWindow : Pointer to the screen's windows.
- * .RastPort : Screen RastPort.
- * .Info : Pointer to LayerInfo structure.
- * .BarLayer : Pointer to layer of the title bar.
- * .BarRast : Pointer to screen's RastPort.
- * .WinColors : Recommended window colors of the screen.
- * .Width : Screen width.
- * .Height : Screen height.
- * .Title : Pointer to screen title string (beware, a Cluster string).
- * .Mouse : Pointer to standard mouse pointer of screen.
- * .Font : The title font of the screen
- * .Flags : The screens flags
- *
- */
-
- typedef APTR EI_ColorLock;
- typedef APTR EI_ColorTablePtr;
-
- /* Corresponding EI_ScreenFlagSet has 8 bits */
-
- #define EI_SCREENQUIET 1
- #define EI_SCREENBEHIND 2
-
-
- struct EI_NewScreen {
- char *Mode;
- WORD Depth;
- UWORD Pad0;
- char *Title;
- E_CLUPtr Colors;
- struct IG_WinColors WinColors;
- LONG BackPen;
- E_EBitMapPtr BackPattern;
- E_EMousePtr Mouse;
- struct TextAttr *Font;
- UBYTE Flags;
- UBYTE Pad1;
- };
-
- typedef struct EI_Screen *EI_ScreenPtr;
- typedef struct EI_NewScreen *EI_NewScreenPtr;
-
- struct EI_Screen {
- EI_ScreenPtr Front, Back;
- E_EScreenPtr EScreen;
- EI_WindowPtr FirstWindow, LastWindow;
- EG_RastPortPtr RastPort;
- EL_LayerInfoPtr LayerInfo;
- EL_LayerPtr BarLayer;
- EG_RastPortPtr BarRast;
- struct IG_WinColors WinColors;
- WORD Width, Height;
- APTR Title;
- E_EMousePtr Mouse;
- EG_EFontPtr Font;
- WORD GadSize;
- UWORD Pad1;
- APTR GadImages;
- UBYTE Flags;
- UBYTE Pad2,Pad3,Pad4;
- EG_EFontPtr WindowFont;
- APTR SGadImage;
- EI_ColorTablePtr Colors;
- EI_ColorLock ColorLock;
- APTR UpGadImages;
- };
-
-
-
- /*
- * Colortags
- */
-
- #define EI_CTAGBASE 0x80010000
- #define EIC_SCREEN_BACKPEN (EI_CTAGBASE+0x00)
- #define EIC_WINDOW_BACKPEN (EI_CTAGBASE+0x01)
- #define EIC_UNKNWON_PEN (EI_CTAGBASE+0x02)
- #define EIC_TEXT_FRONT_PEN (EI_CTAGBASE+0x03)
- #define EIC_TEXT_BACK_PEN (EI_CTAGBASE+0x04)
- #define EIC_SCREENLIGHT (EI_CTAGBASE+0x05)
- #define EIC_SCREEN_PEN (EI_CTAGBASE+0x06)
- #define EIC_SCREEN_DARK (EI_CTAGBASE+0x07)
- #define EIC_SCREEN_TEXT (EI_CTAGBASE+0x08)
- #define EIC_WIN_LIGHT (EI_CTAGBASE+0x09)
- #define EIC_WIN_PEN (EI_CTAGBASE+0x0A)
- #define EIC_WIN_DARK (EI_CTAGBASE+0x0B)
- #define EIC_WIN_TEXT (EI_CTAGBASE+0x0C)
- #define EIC_WIN_ACTIVE_LIGHT (EI_CTAGBASE+0x0D)
- #define EIC_WIN_ACTIVE_PEN (EI_CTAGBASE+0x0E)
- #define EIC_WIN_ACTIVE_DARK (EI_CTAGBASE+0x0F)
- #define EIC_WIN_ACTIVE_TEXT (EI_CTAGBASE+0x10)
- #define EIC_WIN_SLEEP_LIGHT (EI_CTAGBASE+0x11)
- #define EIC_WIN_SLEEP_PEN (EI_CTAGBASE+0x12)
- #define EIC_WIN_SLEEP_DARK (EI_CTAGBASE+0x13)
- #define EIC_WIN_SLEEP_TEXT (EI_CTAGBASE+0x14)
- #define EIC_GADGET_LIGHT (EI_CTAGBASE+0x15)
- #define EIC_GADGET_PEN (EI_CTAGBASE+0x16)
- #define EIC_GADGET_DARK (EI_CTAGBASE+0x17)
- #define EIC_GADGET_TEXT (EI_CTAGBASE+0x18)
- #define EIC_GADGET_SEL_LIGHT (EI_CTAGBASE+0x19)
- #define EIC_GADGET_SEL_PEN (EI_CTAGBASE+0x1A)
- #define EIC_GADGET_SEL_DARK (EI_CTAGBASE+0x1B)
- #define EIC_GADGET_SEL_TEXT (EI_CTAGBASE+0x1C)
- #define EIC_TEXT_GADGET_FRONT (EI_CTAGBASE+0x1D)
- #define EIC_TEXT_GADGET_BACK (EI_CTAGBASE+0x1E)
- #define EIC_PROP_LIGHT (EI_CTAGBASE+0x1F)
- #define EIC_PROP_PEN (EI_CTAGBASE+0x20)
- #define EIC_PROP_DARK (EI_CTAGBASE+0x21)
- #define EIC_KNOB_LIGHT (EI_CTAGBASE+0x22)
- #define EIC_KNOB_PEN (EI_CTAGBASE+0x23)
- #define EIC_KNOB_DARK (EI_CTAGBASE+0x24)
- #define EIC_MENU_LIGHT (EI_CTAGBASE+0x25)
- #define EIC_MENU_PEN (EI_CTAGBASE+0x26)
- #define EIC_MENU_DARK (EI_CTAGBASE+0x27)
- #define EIC_MENU_TEXT (EI_CTAGBASE+0x28)
- #define EIC_MENU_SEL_LIGHT (EI_CTAGBASE+0x29)
- #define EIC_MENU_SEL_PEN (EI_CTAGBASE+0x2A)
- #define EIC_MENU_SEL_DARK (EI_CTAGBASE+0x2B)
- #define EIC_MENU_SEL_TEXT (EI_CTAGBASE+0x2C)
- #define EIC_MASTER_LIGHT (EI_CTAGBASE+0x2D)
- #define EIC_MASTER_PEN (EI_CTAGBASE+0x2E)
- #define EIC_MASTER_DARK (EI_CTAGBASE+0x2F)
- #define EIC_MASTER_TEXT (EI_CTAGBASE+0x30)
- #define EIC_WIN_GADGET_LIGHT (EI_CTAGBASE+0x31)
- #define EIC_WIN_GADGET_DARK (EI_CTAGBASE+0x32)
- #define EIC_WIN_GADGET_BACK (EI_CTAGBASE+0x33)
- #define EIC_WIN_GADGET_PEN (EI_CTAGBASE+0x34)
- #define EIC_TEXT_SELECT_FRONT_PEN (EI_CTAGBASE+0x35)
- #define EIC_TEXT_SELECT_BACK_PEN (EI_CTAGBASE+0x36)
- #define EIC_CURSOR_FRONT_PEN (EI_CTAGBASE+0x37)
- #define EIC_CURSOR_BACK_PEN (EI_CTAGBASE+0x38)
- #define EIC_CURSOR_SELECT_FRONT_PEN (EI_CTAGBASE+0x39)
- #define EIC_CURSOR_SELECT_BACK_PEN (EI_CTAGBASE+0x3A)
- #define EIC_CURSOR_INACTIVE_FRONT_PEN (EI_CTAGBASE+0x3B)
- #define EIC_CURSOR_INACTIVE_BACK_PEN (EI_CTAGBASE+0x3C)
-
- /*
- **
- ** Mouse define for EI_GetPrefPointer
- **
- */
-
- #define EI_MTAGBASE 0x80020000
- #define EIM_STANDARD_MOUSE (EI_MTAGBASE+0x00)
- #define EIM_SLEEP_MOUSE (EI_MTAGBASE+0x01)
- #define EIM_WAIT_MOUSE (EI_MTAGBASE+0x02)
- #define EIM_DISK_READ_MOUSE (EI_MTAGBASE+0x03)
- #define EIM_DISK_WRITE_MOUSE (EI_MTAGBASE+0x04)
- #define EIM_DISKIO_MOUSE (EI_MTAGBASE+0x05)
- #define EIM_WORKING_MOUSE (EI_MTAGBASE+0x06)
- #define EIM_PLAY_MACRO_MOUSE (EI_MTAGBASE+0x07)
- #define EIM_PRINTING_MOUSE (EI_MTAGBASE+0x08)
- #define EIM_SEARCHING_MOUSE (EI_MTAGBASE+0x09)
- #define EIM_FROZEN_MOUSE (EI_MTAGBASE+0x0A)
- #define EIM_COPY_MOUSE (EI_MTAGBASE+0x0B)
- #define EIM_SWAP_MOUSE (EI_MTAGBASE+0x0C)
- #define EIM_MOVE_MOUSE (EI_MTAGBASE+0x0D)
- #define EIM_SELECT_MOUSE (EI_MTAGBASE+0x0E)
- #define EIM_ZOOM_MOUSE (EI_MTAGBASE+0x0F)
- #define EIM_FILL_MOUSE (EI_MTAGBASE+0x10)
- #define EIM_PASTE_MOUSE (EI_MTAGBASE+0x11)
- #define EIM_CUT_MOUSE (EI_MTAGBASE+0x12)
- #define EIM_RECORD_MACRO_MOUSE (EI_MTAGBASE+0x13)
- #define EIM_CROSSHAIR_MOUSE (EI_MTAGBASE+0x14)
- #define EIM_SIZE_MOUSE (EI_MTAGBASE+0x15)
- #define EIM_TEXT_MOUSE (EI_MTAGBASE+0x16)
- #define EIM_AIRBRUSH_MOUSE (EI_MTAGBASE+0x17)
- #define EIM_PICK_MOUSE (EI_MTAGBASE+0x18)
- #define EIM_DRAW_MOUSE (EI_MTAGBASE+0x19)
- #define EIM_PAINT_MOUSE (EI_MTAGBASE+0x1A)
- #define EIM_SELECT_TO_MOUSE (EI_MTAGBASE+0x1B)
- #define EIM_RANGE_MOUSE (EI_MTAGBASE+0x1C)
- #define EIM_CLICK_MOUSE (EI_MTAGBASE+0x1D)
- #define EIM_ROTATE_MOUSE (EI_MTAGBASE+0x1E)
-
- /*
- * Windows
- *
- * Windows use layers, RastPorts and screens. They are the super structure
- * of gadgets and menus. If required, they send messages about user actions
- * and other events.
- *
- * A window consists of one or two layers (GimmeZeroZero). The overhead of
- * the second layer is not as big as to destroy the advantage of automatic
- * clipping. Only simple requester windows without a sizing gadget should
- * be implemented with one-layered windows.
- *
- * Windows can have a render program being executed automatically at refresh
- * by the library. This frees the program from refreshing constant graphics
- * elements.
- *
- *---------------------------------------------------------------------------
- *
- * Structures:
- *
- * EIntuiMsg, EIntuiMsgPtr
- *
- * .class : Type of message:
- *
- * - iMOUSEBUTTONS : Mouse button message; which button and whether
- * pressed or released is contained in the code field.
- * - iMOUSEMOVE : Mouse movement.
- * - iRAWKEY : "Raw" key message, i.e. scan code and qualifier.
- * If VanillaKey is also selected, normal key are
- * reported as Vanillakey and control keys as RawKey
- * message (like 2.0).
- * - iACTIVATE : Window was activated.
- * - iWINDOWREFRESH : Window wants a refresh, the refresh key (refer to
- * EGSLayers) is in the field "iAddress".
- * - iCLOSEWINDOW : User has clicked onto the close gadget.
- * - iNEWSIZE : Window was resized.
- * - iMENUPICK : Menu item has been selected.
- * - iGADGETUP : Gadget was selected.
- * - iVANILLAKEY : Message about translated key press, the ASCII code
- * of the key is in the code field.
- * - iSIZEVERIFY : If the user tries to resize the window, a SizeVerify
- * message is sent. EGSIntui waits until the message
- * is replied. The program can cancel the sizing
- * action with the corresponding message in the code
- * field.
- * - iDISKINSERTED : Self-explanatory.
- * - iDISKREMOVED : Self-explanatory.
- * - iNEWPREFS : The Amiga preferences were changed.
- *
- * .Code : Additional information about the message.
- * .Qualifier : State of the qualifiers (shift etc.) when the event was
- * sent.
- * .IAddress : Address of the structure that caused the event (gadget or
- * menu).
- * .MouseX,
- * .MouseY : Mouse position at event time, relative to top left corner
- * of the window.
- * .Seconds,
- * .Micros : Event time.
- * .IDCMPWindow: Window sending the message.
- *
- * NewWindow
- *
- * .LeftEdge,
- * .TopEdge : Top left window corner.
- * .Width,
- * .Height : Size of window's contents.
- * .MinWidth,
- * .MinHeight : Minimum window size.
- * .MaxWidth,
- * .MaxHeight : Maximum window size.
- * .Screen : Screen on which the window shall open. If NULL is speci-
- * fied, the window is opened on a standard screen. The
- * program should make no assumptions regarding the screen,
- * neither size nor depth.
- * .SysGadgets : System gadgets of the window:
- *
- * - WINDOWCLOSE : Close gadget.
- * - WINDOWSIZE : Size gadget in the bottom right corner.
- * - WINDOWFRONT : Gadget for window-to-front.
- * - WINDOWBACK : Gadget for window-to-back; if only one of both
- * gadgets is there it serves for both purposes just
- * like Kick 2.0.
- * - WINDOWFLIP : Flipping between two positions and sizes like
- * Kick 2.0.
- * - WINDOWBIG : Gadget for maximum size.
- * - WINDOWSMALL : Gadget for minimum size.
- * - WINDOWICON : Iconify.
- * - WINDOWARROWL,
- * - WINDOWARROWR,
- * - WINDOWARROWU,
- * - WINDOWARROWD : Arrows for scrolling gadgets.
- * - WINDOWSCROLLH,
- * - WINDOWSCROLLV : Scrolling gadgets for the window.
- * - WINDOWDRAG : Dragging gadget.
- *
- * .Gadgets : List of gadgets that the window is to have from the
- * beginning.
- * .Name : Window title.
- * .Flags : Window flags
- *
- * - GIMMEZEROZERO : GZZ window with two layers and extra RastPort for
- * inner area and the border.
- * - BORDERLESS : Window has no border and cannot be moved.
- * - SUPERBITMAP : Window gets a SuperBitMap layer, all initializing
- * is done automatically, the size of the SuperBitMap
- * is derived from the maximum window size.
- * - SIMPLEREFRESH : User gets messages about refreshs.
- * - WINDOWACTIVE : Window is currently active.
- * - WINDOWMENUlOCAL : Window menu is relative to the window title.
- * - OWN_COLORPALETTE: Window has a color table on its own for its
- * border etc.
- * - RMBTRAP : If not pressed outside the window, a message is
- * sent for the right mouse button instead of
- * starting menu selection.
- * - REPORTMOUSE : The mouse position is in intervals written into
- * the window structure. This flag is neccessary to
- * get MouseMove events.
- * - BACKDROP : The window is opened behind all other windows.
- * - SMARTREFRESH : The window automatically refreshes itself in most
- * cases apart from resizing.
- * - WINDOWMENUPOPUP : This window's menus appear directly at the mouse
- * position.
- * - SIZEBBOTTOM : The window sizing gadget belongs only to the bottom
- * border.
- * - SIZEBRIGHT : The window sizing gadget belongs only to the right
- * border.
- * - WINDOW_USERSTYLE: The window has its own rendering routine for its
- * borders and gadgets
- * - ACTIVETOFRONT : The window always comes to the front, when it is
- * activated.
- * - QUICKSCROLL : The window offset follows immediately the scroll-
- * ing gadgets
- * - FIXWINDOW_RATIO : The window keeps the width/height ratio according
- * to the maximum size, when resized by the user.
- *
- * .IDCMPFlags : Events to be sent by the window.
- * .UserPort : Pointer to a message port for user actions. If the pointer
- * is NULL the library creates an extra port and removes that
- * port when closing the window.
- * .Colors : Own color table for border and text.
- * .MenuStrip : Pointer to window menu.
- * .Render : Render program to draw the standard window contents.
- *
- * Window, WindowPtr
- *
- * .LeftEdge,
- * .TopEdge : Top left window corner.
- * .Width,
- * .Height : Size of the inner window parts.
- * .LeftBorder,
- * .TopBorder,
- * .RightBorder,
- * .BottomBorder : Width or height of the window border.
- * .RPort : RastPort of the window contents.
- * .Layer : Layer of the window.
- * .Screen : Pointer to the window's screen.
- * .MouseX,
- * .MouseY : The mouse position relative to the top left window edge
- * .UserPort : The windows message port
- */
-
- /* Corresponding EI_SysGadgetSet has 32 bits ! */
-
- #define EI_WINDOWCLOSE (1<<0)
- #define EI_WINDOWSIZE (1<<1)
- #define EI_WINDOWFRONT (1<<2)
- #define EI_WINDOWBACK (1<<3)
- #define EI_WINDOWFLIP (1<<4)
- #define EI_WINDOWBIG (1<<5)
- #define EI_WINDOWSMALL (1<<6)
- #define EI_WINDOWICON (1<<7)
- #define EI_WINDOWARROWL (1<<8)
- #define EI_WINDOWARROWR (1<<9)
- #define EI_WINDOWARROWU (1<<10)
- #define EI_WINDOWARROWD (1<<11)
- #define EI_WINDOWSCROLLH (1<<12)
- #define EI_WINDOWSCROLLV (1<<13)
- #define EI_WINDOWDRAG (1<<14)
-
- /* Corresponding EI_WindowFlagSet has 32 bits ! */
-
- #define EI_GIMMEZEROZERO (1<<0)
- #define EI_BORDERLESS (1<<1)
- #define EI_SUPER_BITMAP (1<<2)
- #define EI_SIMPLE_REFRESH (1<<3)
- #define EI_WINDOWREFRESH (1<<4)
- #define EI_WINDOWACTIVE (1<<5)
- #define EI_WINDOW_MENULOCAL (1<<6)
- #define EI_OWN_IDCMPPORT (1<<7)
- #define EI_OWN_COLORPALETTE (1<<8)
- #define EI_FRONTBACKGADGET (1<<9)
- #define EI_RMBTRAP (1<<10)
- #define EI_REPORTMOUSE (1<<11)
- #define EI_BACKDROP (1<<12)
- #define EI_SMART_REFRESH (1<<13)
- #define EI_WINDOW_MENUPOPUP (1<<14)
- #define EI_SIZEBBOTTOM (1<<15)
- #define EI_SIZEBRIGHT (1<<16)
- #define EI_WINDOW_USERSTYLE (1<<17)
- #define EI_ACTIVETOFRONT (1<<18)
- #define EI_QUICKSCROLL (1<<19)
- #define EI_WINDOW_SLEEPING (1<<20)
- #define EI_FIXWINDOW_RATIO (1<<21)
- #define EI_FORCE_TO_SCREEN (1<<22)
- #define EI_WINDOWCENTER (1<<23)
- #define EI_SEND_OUTSIDEMOVES (1<<24)
- #define EI_MIGRATEABLE (1<<25)
-
- /* Corresponding EI_EIDCMPFlagSet has 32 bits ! */
-
- #define EI_iMOUSEBUTTONS (1<<0)
- #define EI_iMOUSEMOVE (1<<1)
- #define EI_iRAWKEY (1<<2)
- #define EI_iACTIVEWINDOW (1<<3)
- #define EI_iREFRESHWINDOW (1<<4)
- #define EI_iCLOSEWINDOW (1<<5)
- #define EI_iNEWSIZE (1<<6)
- #define EI_iMENUPICK (1<<7)
- #define EI_iGADGETDOWN (1<<8)
- #define EI_iGADGETUP (1<<8)
- #define EI_iMENUVERIFY (1<<9)
- #define EI_iVANILLAKEY (1<<10)
- #define EI_iSIZEVERIFY (1<<11)
- #define EI_iINACTIVEWINDOW (1<<12)
- #define EI_iINTUITICKS (1<<13)
- #define EI_iDISKINSERT (1<<14)
- #define EI_iDISKREMOVE (1<<15)
- #define EI_iNEWPREFS (1<<16)
- #define EI_iMOVEWINDOW (1<<17)
- #define EI_iDROP (1<<18)
- #define EI_iMIGRATEVERIFY (1<<19)
- #define EI_iMIGRATE (1<<20)
-
- struct EI_Window {
- EI_WindowPtr Front, Back,
- Prev, Next, OldActive;
- WORD LeftEdge, TopEdge,
- Width, Height;
- WORD BorderLeft, BorderTop,
- BorderRight, BorderBottom;
- WORD FullWidth, FullHeight;
- WORD LeftUsed, RightUsed;
- WORD MouseX, MouseY;
- EG_RastPortPtr RPort;
- EL_LayerPtr WLayer;
- EI_ScreenPtr WScreen;
- EG_RastPortPtr BorderRPort;
- EL_LayerPtr BorderLayer;
- ULONG Flags;
- ULONG IDCMPFlags;
- struct MsgPort *UserPort;
- EI_GadgetPtr FirstGadget;
- EB_ColorTable GadColors [5];
- struct IG_WinColors WinColors;
- APTR Tile, ScrTitel;
- IG_IntuiGfxPtr Border, Render;
- EI_MenuPtr OuterMenu, MenuStrip;
- E_EMousePtr Pointer;
- WORD MinWidth, MinHeight,
- MaxWidth, MaxHeight;
- WORD FlipWidth, FlipHeight,
- FlipLeft, FlipTop;
- EG_EFontPtr EFont;
- APTR UserData;
- EI_ColorTablePtr Colors;
- LONG SleepCount;
- };
-
- /*
- **
- ** FontTypes see EI_GetPrefFont()
- **
- */
- #define EI_pSCREENFONT 1
- #define EI_pWINDOWFONT 2
- #define EI_pSYSTEMFONT 3
-
-
- struct EI_EIntuiMsg {
-
- struct Message ExecMessage;
- ULONG Class;
- UWORD Code;
- WORD Qualifier;
- APTR IAddress;
- WORD MouseX, MouseY;
- ULONG Seconds, Micros;
- EI_WindowPtr IDCMPWindow;
- WORD RepeatCount; /* Number of repeated Keys */
- WORD Pad1;
- LONG DropType; /* private */
- APTR DropItem; /* private */
- LONG DropSize; /* private */
- E_TabletDataPtr Tablet;
- };
-
- /*
- * EI_UserStyle
- *
- * Structure for own look window border. Uses an IntuiGfx program to draw.
- * The parameters are defined as EI_US_xxx. If an own border is given, all
- * the system gadgets have to be supplied by the programmer too.
- *
- * Example, the original EGS window border:
- *
- * {
- * *** black surrounding ***
- * IG_Const24+0x000000,IG_Color,
- * EI_US_Width,EI_US_Height,IG_Box2d,
- * *** first outer 3d border ***
- * IG_Const+1,IG_Const+1,IG_Locate,
- * IG_Const24+0x000000,EI_US_Middle,
- * EI_US_Width,IG_ADDI-2,
- * EI_US_Height,IG_ADDI-2,IG_Box3d,
- * *** second outer 3d border ***
- * IG_Const+2,IG_Const+2,IG_Locate,
- * EI_US_Dark,EI_US_Light,
- * EI_US_Width,IG_ADDI-4,
- * EI_US_Height,IG_ADDI-4,IG_
- * *** first inner 3d border ***
- * EI_US_Left,IG_ADDI-1,
- * EI_US_Top,IG_ADDI-1,IG_Locate,
- * EI_US_Middle,IG_Const24+0x000000,
- * EI_US_Width,EI_US_Left,IG_SUB,EI_US_Right,IG_SUB,IG_ADDI+2,
- * EI_US_Height,EI_US_Top,IG_SUB,EI_US_Bottom,IG_SUB,IG_ADDI+2,IG_Box3d,
- * *** second inner 3d border ***
- * EI_US_Left,IG_ADDI-2,
- * EI_US_Top,IG_ADDI-2,IG_Locate,
- * EI_US_Middle,IG_Const24+0x000000,
- * EI_US_Width,EI_US_Left,IG_SUB,EI_US_Right,IG_SUB,IG_ADDI+4,
- * EI_US_Height,EI_US_Top,IG_SUB,EI_US_Bottom,IG_SUB,IG_ADDI+4,IG_Box3d,
- * *** filled border area, top... ***
- * EI_US_Middle,IG_Color,
- * *** ... top ... ***
- * IG_Const+3,IG_Const+3,IG_Locate,
- * EI_US_Width,IG_ADDI-6,EI_US_Top,IG_ADDI-5,IG_Box,
- * *** ... right ... ***
- * EI_US_Right,IG_ADDI-5,IG_DUP,
- * IG_NEG,IG_Const+0,IG_Move,
- * EI_US_Height,EI_US_Top,IG_SUB,EI_US_Bottom,IG_SUB,IG_ADDI-4,IG_Box,
- * *** ... left ... ***
- * IG_Const+3,EI_US_Top,IG_ADDI-2,IG_Locate,
- * EI_US_Left,IG_ADDI-5,IG_DUP,
- * EI_US_Height,EI_US_Top,IG_SUB,EI_US_Bottom,IG_SUB,IG_ADDI+4,IG_Box,
- * *** ... bottom ... ***
- * IG_NEG,IG_Const+0,IG_Move,
- * EI_US_Width,IG_ADDI-6,EI_US_Bottom,IG_ADDI-5,IG_Box,
- * *** ... title ... ***
- * EI_US_Font,IG_Font,
- * EI_US_FHeight,IG_ADDI+7,IG_Const+6,IG_Locate,
- * EI_US_TextColor,IG_Color,EI_US_Name,IG_Write,
- * *** good bye ***
- * IG_RTF+13
- * }
- *
- */
-
- typedef struct EI_UserStyle *EI_UserStylePtr;
-
- #define EI_US_TEXTCOLOR (IG_GETFI+12) /* color of title text */
- #define EI_US_LEFT (IG_GETFI+11) /* width of left border */
- #define EI_US_TOP (IG_GETFI+10) /* height of top border */
- #define EI_US_RIGHT (IG_GETFI+9) /* width of right border */
- #define EI_US_BOTTOM (IG_GETFI+8) /* height of bottom border */
- #define EI_US_FONT (IG_GETFI+7) /* font of title text */
- #define EI_US_FHEIGHT (IG_GETFI+6) /* fontheight */
- #define EI_US_NAME (IG_GETFI+5) /* title, use IG_Write */
- #define EI_US_MIDDLE (IG_GETFI+4) /* main border pen */
- #define EI_US_DARK (IG_GETFI+3) /* dark border pen */
- #define EI_US_LIGHT (IG_GETFI+2) /* light border pen */
- #define EI_US_WIDTH (IG_GETFI+1) /* full window width and height */
- #define EI_US_HEIGHT (IG_GETFI+0) /* including the border */
-
- struct EI_UserStyle {
- WORD BorderLeft, BorderTop,
- BorderRight, BorderBottom;
- IG_IntuiGfxPtr DrawBorder;
- };
-
-
- struct EI_NewWindow {
- WORD LeftEdge, TopEdge,
- Width, Height;
- WORD MinWidth, MinHeight,
- MaxWidth, MaxHeight;
- EI_ScreenPtr Screen;
-
- /* Tag for this union is hidden by WindowUserStyle flag in "flags" field */
-
- union {
- ULONG SysGadgets;
- EI_UserStylePtr UserStyle;
-
- } Bordef;
-
- EI_GadgetPtr FirstGadgets;
- char *Title;
- ULONG Flags;
- ULONG IDCMPFlags;
- struct MsgPort *Port;
- struct IG_WinColors Colors;
- EI_MenuPtr Menu;
- IG_IntuiGfxPtr Render;
- };
-
- typedef struct EI_NewWindow *EI_NewWindowPtr;
-
- #endif /* EGS_EGSINTUI_H */
-
-
-